//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS CodeGuruProfiler service.
///
///  This section provides documentation for the Amazon CodeGuru Profiler API operations.   Amazon CodeGuru Profiler collects runtime performance data from your live applications, and provides recommendations that can help you fine-tune your application performance. Using machine learning algorithms, CodeGuru Profiler can help you find your most expensive lines of code and suggest ways you can improve efficiency and remove CPU bottlenecks.   Amazon CodeGuru Profiler provides different visualizations of profiling data to help you identify what code is running on the CPU, see how much time is consumed, and suggest ways to reduce CPU utilization.   Amazon CodeGuru Profiler currently supports applications written in all Java virtual machine (JVM) languages and Python. While CodeGuru Profiler supports both visualizations and recommendations for applications written in Java, it can also generate visualizations and a subset of recommendations for applications written in other JVM languages and Python.   For more information, see What is Amazon CodeGuru Profiler in  the Amazon CodeGuru Profiler User Guide.
public struct CodeGuruProfiler: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the CodeGuruProfiler client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "CodeGuruProfiler",
            serviceIdentifier: "codeguru-profiler",
            serviceProtocol: .restjson,
            apiVersion: "2019-07-18",
            endpoint: endpoint,
            errorType: CodeGuruProfilerErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Add up to 2 anomaly notifications channels for a profiling group.
    @Sendable
    @inlinable
    public func addNotificationChannels(_ input: AddNotificationChannelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AddNotificationChannelsResponse {
        try await self.client.execute(
            operation: "AddNotificationChannels", 
            path: "/profilingGroups/{profilingGroupName}/notificationConfiguration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add up to 2 anomaly notifications channels for a profiling group.
    ///
    /// Parameters:
    ///   - channels: One or 2 channels to report to when anomalies are detected.
    ///   - profilingGroupName: The name of the profiling group that we are setting up notifications for.
    ///   - logger: Logger use during operation
    @inlinable
    public func addNotificationChannels(
        channels: [Channel],
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AddNotificationChannelsResponse {
        let input = AddNotificationChannelsRequest(
            channels: channels, 
            profilingGroupName: profilingGroupName
        )
        return try await self.addNotificationChannels(input, logger: logger)
    }

    ///  Returns the time series of values for a requested list  of frame metrics from a time period.
    @Sendable
    @inlinable
    public func batchGetFrameMetricData(_ input: BatchGetFrameMetricDataRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchGetFrameMetricDataResponse {
        try await self.client.execute(
            operation: "BatchGetFrameMetricData", 
            path: "/profilingGroups/{profilingGroupName}/frames/-/metrics", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns the time series of values for a requested list  of frame metrics from a time period.
    ///
    /// Parameters:
    ///   - endTime:  The end time of the time period for the returned time series values.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - frameMetrics:  The details of the metrics that are used to request a time series of values. The metric includes  the name of the frame, the aggregation type to calculate the metric value for the  frame, and the thread states to use to get the count for the metric value of the frame.
    ///   - period:  The duration of the frame metrics used to return the time series values.  Specify using the ISO 8601 format. The maximum period duration  is one day (PT24H or P1D).
    ///   - profilingGroupName:  The name of the profiling group associated with the  the frame metrics used to return the time series values.
    ///   - startTime:  The start time of the time period for the frame metrics used to return the time series values.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - targetResolution: The requested resolution of time steps for the returned time series of values.  If the requested target resolution is not available due to data not being retained we provide a best effort  result by falling back to the most granular available resolution after the target resolution.  There are 3 valid values.     P1D — 1 day     PT1H — 1 hour     PT5M — 5 minutes
    ///   - logger: Logger use during operation
    @inlinable
    public func batchGetFrameMetricData(
        endTime: Date? = nil,
        frameMetrics: [FrameMetric]? = nil,
        period: String? = nil,
        profilingGroupName: String,
        startTime: Date? = nil,
        targetResolution: AggregationPeriod? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchGetFrameMetricDataResponse {
        let input = BatchGetFrameMetricDataRequest(
            endTime: endTime, 
            frameMetrics: frameMetrics, 
            period: period, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime, 
            targetResolution: targetResolution
        )
        return try await self.batchGetFrameMetricData(input, logger: logger)
    }

    ///  Used by profiler agents to report their current state and to receive remote  configuration updates. For example, ConfigureAgent can be used  to tell an agent whether to profile or not and for how long to return profiling data.
    @Sendable
    @inlinable
    public func configureAgent(_ input: ConfigureAgentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ConfigureAgentResponse {
        try await self.client.execute(
            operation: "ConfigureAgent", 
            path: "/profilingGroups/{profilingGroupName}/configureAgent", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Used by profiler agents to report their current state and to receive remote  configuration updates. For example, ConfigureAgent can be used  to tell an agent whether to profile or not and for how long to return profiling data.
    ///
    /// Parameters:
    ///   - fleetInstanceId:  A universally unique identifier (UUID) for a profiling instance. For example, if the profiling instance is an Amazon EC2 instance, it is the instance ID. If it is an AWS Fargate container, it is the container's task ID.
    ///   - metadata:  Metadata captured about the compute platform the agent is running on. It includes information about sampling and reporting. The valid fields are:    COMPUTE_PLATFORM - The compute platform on which the agent is running     AGENT_ID - The ID for an agent instance.     AWS_REQUEST_ID - The AWS request ID of a Lambda invocation.     EXECUTION_ENVIRONMENT - The execution environment a Lambda function is running on.     LAMBDA_FUNCTION_ARN - The Amazon Resource Name (ARN) that is used to invoke a Lambda function.     LAMBDA_MEMORY_LIMIT_IN_MB - The memory allocated to a Lambda function.     LAMBDA_REMAINING_TIME_IN_MILLISECONDS - The time in milliseconds before execution of a Lambda function times out.     LAMBDA_TIME_GAP_BETWEEN_INVOKES_IN_MILLISECONDS - The time in milliseconds between two invocations of a Lambda function.     LAMBDA_PREVIOUS_EXECUTION_TIME_IN_MILLISECONDS - The time in milliseconds for the previous Lambda invocation.
    ///   - profilingGroupName:  The name of the profiling group for which the configured agent is collecting profiling data.
    ///   - logger: Logger use during operation
    @inlinable
    public func configureAgent(
        fleetInstanceId: String? = nil,
        metadata: [MetadataField: String]? = nil,
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ConfigureAgentResponse {
        let input = ConfigureAgentRequest(
            fleetInstanceId: fleetInstanceId, 
            metadata: metadata, 
            profilingGroupName: profilingGroupName
        )
        return try await self.configureAgent(input, logger: logger)
    }

    /// Creates a profiling group.
    @Sendable
    @inlinable
    public func createProfilingGroup(_ input: CreateProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateProfilingGroupResponse {
        try await self.client.execute(
            operation: "CreateProfilingGroup", 
            path: "/profilingGroups", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a profiling group.
    ///
    /// Parameters:
    ///   - agentOrchestrationConfig:  Specifies whether profiling is enabled or disabled for the created profiling group.
    ///   - clientToken:  Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental creation of duplicate profiling groups if there are failures and retries.
    ///   - computePlatform:  The compute platform of the profiling group. Use AWSLambda if your application  runs on AWS Lambda. Use Default if your application runs on a compute platform that  is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform.  If not specified, Default is used.
    ///   - profilingGroupName: The name of the profiling group to create.
    ///   - tags:  A list of tags to add to the created profiling group.
    ///   - logger: Logger use during operation
    @inlinable
    public func createProfilingGroup(
        agentOrchestrationConfig: AgentOrchestrationConfig? = nil,
        clientToken: String = CreateProfilingGroupRequest.idempotencyToken(),
        computePlatform: ComputePlatform? = nil,
        profilingGroupName: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateProfilingGroupResponse {
        let input = CreateProfilingGroupRequest(
            agentOrchestrationConfig: agentOrchestrationConfig, 
            clientToken: clientToken, 
            computePlatform: computePlatform, 
            profilingGroupName: profilingGroupName, 
            tags: tags
        )
        return try await self.createProfilingGroup(input, logger: logger)
    }

    /// Deletes a profiling group.
    @Sendable
    @inlinable
    public func deleteProfilingGroup(_ input: DeleteProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteProfilingGroupResponse {
        try await self.client.execute(
            operation: "DeleteProfilingGroup", 
            path: "/profilingGroups/{profilingGroupName}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a profiling group.
    ///
    /// Parameters:
    ///   - profilingGroupName: The name of the profiling group to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteProfilingGroup(
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteProfilingGroupResponse {
        let input = DeleteProfilingGroupRequest(
            profilingGroupName: profilingGroupName
        )
        return try await self.deleteProfilingGroup(input, logger: logger)
    }

    ///  Returns a  ProfilingGroupDescription  object that contains information about the requested profiling group.
    @Sendable
    @inlinable
    public func describeProfilingGroup(_ input: DescribeProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeProfilingGroupResponse {
        try await self.client.execute(
            operation: "DescribeProfilingGroup", 
            path: "/profilingGroups/{profilingGroupName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a  ProfilingGroupDescription  object that contains information about the requested profiling group.
    ///
    /// Parameters:
    ///   - profilingGroupName:  The name of the profiling group to get information about.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeProfilingGroup(
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeProfilingGroupResponse {
        let input = DescribeProfilingGroupRequest(
            profilingGroupName: profilingGroupName
        )
        return try await self.describeProfilingGroup(input, logger: logger)
    }

    ///  Returns a list of   FindingsReportSummary  objects that contain analysis results for all profiling groups in your AWS account.
    @Sendable
    @inlinable
    public func getFindingsReportAccountSummary(_ input: GetFindingsReportAccountSummaryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetFindingsReportAccountSummaryResponse {
        try await self.client.execute(
            operation: "GetFindingsReportAccountSummary", 
            path: "/internal/findingsReports", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of   FindingsReportSummary  objects that contain analysis results for all profiling groups in your AWS account.
    ///
    /// Parameters:
    ///   - dailyReportsOnly: A Boolean value indicating whether to only return reports from daily profiles. If set  to True, only analysis data from daily profiles is returned. If set to False,  analysis data is returned from smaller time windows (for example, one hour).
    ///   - maxResults: The maximum number of results returned by  GetFindingsReportAccountSummary in paginated output.  When this parameter is used, GetFindingsReportAccountSummary only returns maxResults  results in a single page along with a nextToken response element. The remaining results of the initial  request can be seen by sending another GetFindingsReportAccountSummary request with the returned  nextToken value.
    ///   - nextToken: The nextToken value returned from a previous paginated GetFindingsReportAccountSummary request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.   This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    ///   - logger: Logger use during operation
    @inlinable
    public func getFindingsReportAccountSummary(
        dailyReportsOnly: Bool? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetFindingsReportAccountSummaryResponse {
        let input = GetFindingsReportAccountSummaryRequest(
            dailyReportsOnly: dailyReportsOnly, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.getFindingsReportAccountSummary(input, logger: logger)
    }

    /// Get the current configuration for anomaly notifications for a profiling group.
    @Sendable
    @inlinable
    public func getNotificationConfiguration(_ input: GetNotificationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetNotificationConfigurationResponse {
        try await self.client.execute(
            operation: "GetNotificationConfiguration", 
            path: "/profilingGroups/{profilingGroupName}/notificationConfiguration", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get the current configuration for anomaly notifications for a profiling group.
    ///
    /// Parameters:
    ///   - profilingGroupName: The name of the profiling group we want to get the notification configuration for.
    ///   - logger: Logger use during operation
    @inlinable
    public func getNotificationConfiguration(
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetNotificationConfigurationResponse {
        let input = GetNotificationConfigurationRequest(
            profilingGroupName: profilingGroupName
        )
        return try await self.getNotificationConfiguration(input, logger: logger)
    }

    ///  Returns the JSON-formatted resource-based policy on a profiling group.
    @Sendable
    @inlinable
    public func getPolicy(_ input: GetPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetPolicyResponse {
        try await self.client.execute(
            operation: "GetPolicy", 
            path: "/profilingGroups/{profilingGroupName}/policy", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns the JSON-formatted resource-based policy on a profiling group.
    ///
    /// Parameters:
    ///   - profilingGroupName: The name of the profiling group.
    ///   - logger: Logger use during operation
    @inlinable
    public func getPolicy(
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetPolicyResponse {
        let input = GetPolicyRequest(
            profilingGroupName: profilingGroupName
        )
        return try await self.getPolicy(input, logger: logger)
    }

    ///  Gets the aggregated profile of a profiling group for a specified time range.  Amazon CodeGuru Profiler collects posted agent profiles for a profiling group  into aggregated profiles.       Because aggregated profiles expire over time GetProfile is not idempotent.     Specify the time range for the requested aggregated profile using 1 or 2 of the following parameters: startTime,  endTime, period. The maximum time range allowed is 7 days. If you specify all 3 parameters,  an exception is thrown. If you specify only period, the latest aggregated profile is returned.     Aggregated profiles are available with aggregation periods of 5 minutes, 1 hour, and 1 day, aligned to  UTC. The aggregation period of an aggregated profile determines how long it is retained. For more  information, see  AggregatedProfileTime . The aggregated profile's aggregation period determines how long   it is retained by CodeGuru Profiler.      If the aggregation period is 5 minutes, the aggregated profile is retained for 15 days.     If the aggregation period is 1 hour, the aggregated profile is retained for 60 days.     If the aggregation period is 1 day, the aggregated profile is retained for 3 years.     There are two use cases for calling GetProfile.    If you want to return an aggregated profile that already exists, use   ListProfileTimes to  view the time ranges of existing aggregated profiles. Use them in a GetProfile request to return a specific,  existing aggregated profile.     If you want to return an aggregated profile for a time range that doesn't align with an existing aggregated profile,  then CodeGuru Profiler makes a best effort to combine existing aggregated profiles from the requested time  range and return them as one aggregated profile.    If aggregated profiles do not exist for the full time range requested, then aggregated profiles for a smaller time range are returned. For example, if the requested time range is from 00:00 to 00:20, and the existing aggregated profiles are from 00:15 and 00:25, then the aggregated profiles from 00:15 to 00:20 are returned.
    @Sendable
    @inlinable
    public func getProfile(_ input: GetProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProfileResponse {
        try await self.client.execute(
            operation: "GetProfile", 
            path: "/profilingGroups/{profilingGroupName}/profile", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Gets the aggregated profile of a profiling group for a specified time range.  Amazon CodeGuru Profiler collects posted agent profiles for a profiling group  into aggregated profiles.       Because aggregated profiles expire over time GetProfile is not idempotent.     Specify the time range for the requested aggregated profile using 1 or 2 of the following parameters: startTime,  endTime, period. The maximum time range allowed is 7 days. If you specify all 3 parameters,  an exception is thrown. If you specify only period, the latest aggregated profile is returned.     Aggregated profiles are available with aggregation periods of 5 minutes, 1 hour, and 1 day, aligned to  UTC. The aggregation period of an aggregated profile determines how long it is retained. For more  information, see  AggregatedProfileTime . The aggregated profile's aggregation period determines how long   it is retained by CodeGuru Profiler.      If the aggregation period is 5 minutes, the aggregated profile is retained for 15 days.     If the aggregation period is 1 hour, the aggregated profile is retained for 60 days.     If the aggregation period is 1 day, the aggregated profile is retained for 3 years.     There are two use cases for calling GetProfile.    If you want to return an aggregated profile that already exists, use   ListProfileTimes to  view the time ranges of existing aggregated profiles. Use them in a GetProfile request to return a specific,  existing aggregated profile.     If you want to return an aggregated profile for a time range that doesn't align with an existing aggregated profile,  then CodeGuru Profiler makes a best effort to combine existing aggregated profiles from the requested time  range and return them as one aggregated profile.    If aggregated profiles do not exist for the full time range requested, then aggregated profiles for a smaller time range are returned. For example, if the requested time range is from 00:00 to 00:20, and the existing aggregated profiles are from 00:15 and 00:25, then the aggregated profiles from 00:15 to 00:20 are returned.
    ///
    /// Parameters:
    ///   - accept:  The format of the returned profiling data. The format maps to the  Accept and Content-Type headers of the  HTTP request. You can specify one of the following:  or the default .      application/json — standard JSON format      application/x-amzn-ion — the Amazon Ion data format. For more information,  see Amazon Ion.
    ///   - endTime:  The end time of the requested profile. Specify using  the ISO 8601 format. For example,  2020-06-01T13:15:02.001Z  represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.   If you specify endTime, then you must also specify period  or startTime, but not both.
    ///   - maxDepth:  The maximum depth of the stacks in the code that is represented in  the aggregated profile. For example, if CodeGuru Profiler finds a method A,  which calls method B, which calls method C, which  calls method D, then the depth is 4. If the maxDepth is  set to 2, then the aggregated profile contains representations of methods A  and B.
    ///   - period:  Used with startTime or endTime to specify  the time range for the returned aggregated profile. Specify using  the ISO 8601 format. For example, P1DT1H1M1S.    To get the latest aggregated profile, specify only period.
    ///   - profilingGroupName: The name of the profiling group to get.
    ///   - startTime: The start time of the profile to get. Specify using  the ISO 8601 format. For example,  2020-06-01T13:15:02.001Z  represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.   If you specify startTime, then you must also specify period  or endTime, but not both.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfile(
        accept: String? = nil,
        endTime: Date? = nil,
        maxDepth: Int? = nil,
        period: String? = nil,
        profilingGroupName: String,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProfileResponse {
        let input = GetProfileRequest(
            accept: accept, 
            endTime: endTime, 
            maxDepth: maxDepth, 
            period: period, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return try await self.getProfile(input, logger: logger)
    }

    ///  Returns a list of   Recommendation  objects that contain recommendations for a profiling group for a given time period. A list of   Anomaly  objects that contains details about anomalies detected in the profiling group for the same time period is also  returned.
    @Sendable
    @inlinable
    public func getRecommendations(_ input: GetRecommendationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRecommendationsResponse {
        try await self.client.execute(
            operation: "GetRecommendations", 
            path: "/internal/profilingGroups/{profilingGroupName}/recommendations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of   Recommendation  objects that contain recommendations for a profiling group for a given time period. A list of   Anomaly  objects that contains details about anomalies detected in the profiling group for the same time period is also  returned.
    ///
    /// Parameters:
    ///   - endTime:  The start time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - locale:  The language used to provide analysis. Specify using a string that is one  of the following BCP 47 language codes.     de-DE - German, Germany     en-GB - English, United Kingdom     en-US - English, United States     es-ES - Spanish, Spain     fr-FR - French, France     it-IT - Italian, Italy     ja-JP - Japanese, Japan     ko-KR - Korean, Republic of Korea     pt-BR - Portugese, Brazil     zh-CN - Chinese, China     zh-TW - Chinese, Taiwan
    ///   - profilingGroupName:  The name of the profiling group to get analysis data about.
    ///   - startTime:  The end time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - logger: Logger use during operation
    @inlinable
    public func getRecommendations(
        endTime: Date,
        locale: String? = nil,
        profilingGroupName: String,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRecommendationsResponse {
        let input = GetRecommendationsRequest(
            endTime: endTime, 
            locale: locale, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return try await self.getRecommendations(input, logger: logger)
    }

    /// List the available reports for a given profiling group and time range.
    @Sendable
    @inlinable
    public func listFindingsReports(_ input: ListFindingsReportsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListFindingsReportsResponse {
        try await self.client.execute(
            operation: "ListFindingsReports", 
            path: "/internal/profilingGroups/{profilingGroupName}/findingsReports", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List the available reports for a given profiling group and time range.
    ///
    /// Parameters:
    ///   - dailyReportsOnly: A Boolean value indicating whether to only return reports from daily profiles. If set  to True, only analysis data from daily profiles is returned. If set to False,  analysis data is returned from smaller time windows (for example, one hour).
    ///   - endTime:  The end time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - maxResults: The maximum number of report results returned by ListFindingsReports in paginated output. When this parameter is used, ListFindingsReports only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListFindingsReports request with the returned nextToken value.
    ///   - nextToken: The nextToken value returned from a previous paginated ListFindingsReportsRequest request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.   This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    ///   - profilingGroupName: The name of the profiling group from which to search for analysis data.
    ///   - startTime:  The start time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - logger: Logger use during operation
    @inlinable
    public func listFindingsReports(
        dailyReportsOnly: Bool? = nil,
        endTime: Date,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        profilingGroupName: String,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListFindingsReportsResponse {
        let input = ListFindingsReportsRequest(
            dailyReportsOnly: dailyReportsOnly, 
            endTime: endTime, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return try await self.listFindingsReports(input, logger: logger)
    }

    /// Lists the start times of the available aggregated profiles of a profiling group  for an aggregation period within the specified time range.
    @Sendable
    @inlinable
    public func listProfileTimes(_ input: ListProfileTimesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfileTimesResponse {
        try await self.client.execute(
            operation: "ListProfileTimes", 
            path: "/profilingGroups/{profilingGroupName}/profileTimes", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the start times of the available aggregated profiles of a profiling group  for an aggregation period within the specified time range.
    ///
    /// Parameters:
    ///   - endTime: The end time of the time range from which to list the profiles.
    ///   - maxResults: The maximum number of profile time results returned by ListProfileTimes  in paginated output. When this parameter is used, ListProfileTimes only returns  maxResults results in a single page with a nextToken response  element. The remaining results of the initial request  can be seen by sending another ListProfileTimes request with the returned  nextToken value.
    ///   - nextToken: The nextToken value returned from a previous paginated  ListProfileTimes request where maxResults was used and the results  exceeded the value of that parameter. Pagination continues from the end of the previous results  that returned the nextToken value.    This token should be treated as an opaque identifier that is only used to retrieve  the next items in a list and not for other programmatic purposes.
    ///   - orderBy: The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to TIMESTAMP_DESCENDING.
    ///   - period:  The aggregation period. This specifies the period during which an aggregation profile  collects posted agent profiles for a profiling group. There are 3 valid values.     P1D — 1 day     PT1H — 1 hour     PT5M — 5 minutes
    ///   - profilingGroupName: The name of the profiling group.
    ///   - startTime: The start time of the time range from which to list the profiles.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfileTimes(
        endTime: Date,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        orderBy: OrderBy? = nil,
        period: AggregationPeriod,
        profilingGroupName: String,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfileTimesResponse {
        let input = ListProfileTimesRequest(
            endTime: endTime, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            orderBy: orderBy, 
            period: period, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return try await self.listProfileTimes(input, logger: logger)
    }

    ///  Returns a list of profiling groups. The profiling groups are returned as   ProfilingGroupDescription  objects.
    @Sendable
    @inlinable
    public func listProfilingGroups(_ input: ListProfilingGroupsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfilingGroupsResponse {
        try await self.client.execute(
            operation: "ListProfilingGroups", 
            path: "/profilingGroups", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of profiling groups. The profiling groups are returned as   ProfilingGroupDescription  objects.
    ///
    /// Parameters:
    ///   - includeDescription: A Boolean value indicating whether to include a description. If true,  then a list of   ProfilingGroupDescription objects  that contain detailed information about profiling groups is returned. If false, then  a list of profiling group names is returned.
    ///   - maxResults: The maximum number of profiling groups results returned by ListProfilingGroups  in paginated output. When this parameter is used, ListProfilingGroups only returns  maxResults results in a single page along with a nextToken response  element. The remaining results of the initial request  can be seen by sending another ListProfilingGroups request with the returned  nextToken value.
    ///   - nextToken: The nextToken value returned from a previous paginated  ListProfilingGroups request where maxResults was used and the results  exceeded the value of that parameter. Pagination continues from the end of the previous results  that returned the nextToken value.    This token should be treated as an opaque identifier that is only used to retrieve  the next items in a list and not for other programmatic purposes.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfilingGroups(
        includeDescription: Bool? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfilingGroupsResponse {
        let input = ListProfilingGroupsRequest(
            includeDescription: includeDescription, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listProfilingGroups(input, logger: logger)
    }

    ///  Returns a list of the tags that are assigned to a specified resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of the tags that are assigned to a specified resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) of the resource that contains the tags to return.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    ///  Submits profiling data to an aggregated profile of a profiling group. To get an   aggregated profile that is created with this profiling data, use   GetProfile .
    @Sendable
    @inlinable
    public func postAgentProfile(_ input: PostAgentProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PostAgentProfileResponse {
        try await self.client.execute(
            operation: "PostAgentProfile", 
            path: "/profilingGroups/{profilingGroupName}/agentProfile", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Submits profiling data to an aggregated profile of a profiling group. To get an   aggregated profile that is created with this profiling data, use   GetProfile .
    ///
    /// Parameters:
    ///   - agentProfile:  The submitted profiling data.
    ///   - contentType:  The format of the submitted profiling data. The format maps to the  Accept and Content-Type headers of the  HTTP request. You can specify one of the following:  or the default .      application/json — standard JSON format      application/x-amzn-ion — the Amazon Ion data format. For more information,  see Amazon Ion.
    ///   - profileToken:  Amazon CodeGuru Profiler uses this universally unique identifier (UUID) to prevent the accidental submission of duplicate profiling data if there are failures and retries.
    ///   - profilingGroupName:  The name of the profiling group with the aggregated profile that receives the  submitted profiling data.
    ///   - logger: Logger use during operation
    @inlinable
    public func postAgentProfile(
        agentProfile: AWSHTTPBody,
        contentType: String,
        profileToken: String? = PostAgentProfileRequest.idempotencyToken(),
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PostAgentProfileResponse {
        let input = PostAgentProfileRequest(
            agentProfile: agentProfile, 
            contentType: contentType, 
            profileToken: profileToken, 
            profilingGroupName: profilingGroupName
        )
        return try await self.postAgentProfile(input, logger: logger)
    }

    ///  Adds permissions to a profiling group's resource-based policy  that are provided using an action group. If a profiling group doesn't have  a resource-based policy, one is created for it using the permissions in the action group and  the roles and users in the principals parameter.   The one supported action group that can be added is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide,  ConfigureAgent , and  PostAgentProfile .    The first time you call PutPermission on a profiling group, do not specify a revisionId because  it doesn't have a resource-based policy. Subsequent calls must provide a revisionId to specify  which revision of the resource-based policy to add the permissions to.    The response contains the profiling group's JSON-formatted resource policy.
    @Sendable
    @inlinable
    public func putPermission(_ input: PutPermissionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutPermissionResponse {
        try await self.client.execute(
            operation: "PutPermission", 
            path: "/profilingGroups/{profilingGroupName}/policy/{actionGroup}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Adds permissions to a profiling group's resource-based policy  that are provided using an action group. If a profiling group doesn't have  a resource-based policy, one is created for it using the permissions in the action group and  the roles and users in the principals parameter.   The one supported action group that can be added is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide,  ConfigureAgent , and  PostAgentProfile .    The first time you call PutPermission on a profiling group, do not specify a revisionId because  it doesn't have a resource-based policy. Subsequent calls must provide a revisionId to specify  which revision of the resource-based policy to add the permissions to.    The response contains the profiling group's JSON-formatted resource policy.
    ///
    /// Parameters:
    ///   - actionGroup:  Specifies an action group that contains permissions to add to  a profiling group resource. One action group is supported, agentPermissions, which  grants permission to perform actions required by the profiling agent, ConfigureAgent  and PostAgentProfile permissions.
    ///   - principals:  A list ARNs for the roles and users you want to grant access to the profiling group.  Wildcards are not are supported in the ARNs.
    ///   - profilingGroupName: The name of the profiling group to grant access to.
    ///   - revisionId:  A universally unique identifier (UUID) for the revision of the policy you  are adding to the profiling group. Do not specify  this when you add permissions to a profiling group for the first time. If a policy already exists on the  profiling group, you must specify the revisionId.
    ///   - logger: Logger use during operation
    @inlinable
    public func putPermission(
        actionGroup: ActionGroup,
        principals: [String],
        profilingGroupName: String,
        revisionId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutPermissionResponse {
        let input = PutPermissionRequest(
            actionGroup: actionGroup, 
            principals: principals, 
            profilingGroupName: profilingGroupName, 
            revisionId: revisionId
        )
        return try await self.putPermission(input, logger: logger)
    }

    /// Remove one anomaly notifications channel for a profiling group.
    @Sendable
    @inlinable
    public func removeNotificationChannel(_ input: RemoveNotificationChannelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RemoveNotificationChannelResponse {
        try await self.client.execute(
            operation: "RemoveNotificationChannel", 
            path: "/profilingGroups/{profilingGroupName}/notificationConfiguration/{channelId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove one anomaly notifications channel for a profiling group.
    ///
    /// Parameters:
    ///   - channelId: The id of the channel that we want to stop receiving notifications.
    ///   - profilingGroupName: The name of the profiling group we want to change notification configuration for.
    ///   - logger: Logger use during operation
    @inlinable
    public func removeNotificationChannel(
        channelId: String,
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RemoveNotificationChannelResponse {
        let input = RemoveNotificationChannelRequest(
            channelId: channelId, 
            profilingGroupName: profilingGroupName
        )
        return try await self.removeNotificationChannel(input, logger: logger)
    }

    ///  Removes permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide,  ConfigureAgent , and  PostAgentProfile .
    @Sendable
    @inlinable
    public func removePermission(_ input: RemovePermissionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RemovePermissionResponse {
        try await self.client.execute(
            operation: "RemovePermission", 
            path: "/profilingGroups/{profilingGroupName}/policy/{actionGroup}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Removes permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide,  ConfigureAgent , and  PostAgentProfile .
    ///
    /// Parameters:
    ///   - actionGroup:  Specifies an action group that contains the permissions to remove from  a profiling group's resource-based policy. One action group is supported, agentPermissions, which  grants ConfigureAgent and PostAgentProfile permissions.
    ///   - profilingGroupName: The name of the profiling group.
    ///   - revisionId:  A universally unique identifier (UUID) for the revision of the resource-based policy from which  you want to remove permissions.
    ///   - logger: Logger use during operation
    @inlinable
    public func removePermission(
        actionGroup: ActionGroup,
        profilingGroupName: String,
        revisionId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RemovePermissionResponse {
        let input = RemovePermissionRequest(
            actionGroup: actionGroup, 
            profilingGroupName: profilingGroupName, 
            revisionId: revisionId
        )
        return try await self.removePermission(input, logger: logger)
    }

    /// Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is  useful or not.
    @Sendable
    @inlinable
    public func submitFeedback(_ input: SubmitFeedbackRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SubmitFeedbackResponse {
        try await self.client.execute(
            operation: "SubmitFeedback", 
            path: "/internal/profilingGroups/{profilingGroupName}/anomalies/{anomalyInstanceId}/feedback", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is  useful or not.
    ///
    /// Parameters:
    ///   - anomalyInstanceId: The universally unique identifier (UUID) of the   AnomalyInstance object  that is included in the analysis data.
    ///   - comment: Optional feedback about this anomaly.
    ///   - profilingGroupName: The name of the profiling group that is associated with the analysis data.
    ///   - type:  The feedback tpye. Thee are two valid values, Positive and Negative.
    ///   - logger: Logger use during operation
    @inlinable
    public func submitFeedback(
        anomalyInstanceId: String,
        comment: String? = nil,
        profilingGroupName: String,
        type: FeedbackType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SubmitFeedbackResponse {
        let input = SubmitFeedbackRequest(
            anomalyInstanceId: anomalyInstanceId, 
            comment: comment, 
            profilingGroupName: profilingGroupName, 
            type: type
        )
        return try await self.submitFeedback(input, logger: logger)
    }

    ///  Use to assign one or more tags to a resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Use to assign one or more tags to a resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) of the resource that the tags are added to.
    ///   - tags:  The list of tags that are added to the specified resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    ///  Use to remove one or more tags from a resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Use to remove one or more tags from a resource.
    ///
    /// Parameters:
    ///   - resourceArn:  The Amazon Resource Name (ARN) of the resource that contains the tags to remove.
    ///   - tagKeys:  A list of tag keys. Existing tags of resources with keys in this list are removed from  the specified resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates a profiling group.
    @Sendable
    @inlinable
    public func updateProfilingGroup(_ input: UpdateProfilingGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateProfilingGroupResponse {
        try await self.client.execute(
            operation: "UpdateProfilingGroup", 
            path: "/profilingGroups/{profilingGroupName}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a profiling group.
    ///
    /// Parameters:
    ///   - agentOrchestrationConfig:  Specifies whether profiling is enabled or disabled for a profiling group.
    ///   - profilingGroupName: The name of the profiling group to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateProfilingGroup(
        agentOrchestrationConfig: AgentOrchestrationConfig,
        profilingGroupName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateProfilingGroupResponse {
        let input = UpdateProfilingGroupRequest(
            agentOrchestrationConfig: agentOrchestrationConfig, 
            profilingGroupName: profilingGroupName
        )
        return try await self.updateProfilingGroup(input, logger: logger)
    }
}

extension CodeGuruProfiler {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: CodeGuruProfiler, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CodeGuruProfiler {
    /// Return PaginatorSequence for operation ``getFindingsReportAccountSummary(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getFindingsReportAccountSummaryPaginator(
        _ input: GetFindingsReportAccountSummaryRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetFindingsReportAccountSummaryRequest, GetFindingsReportAccountSummaryResponse> {
        return .init(
            input: input,
            command: self.getFindingsReportAccountSummary,
            inputKey: \GetFindingsReportAccountSummaryRequest.nextToken,
            outputKey: \GetFindingsReportAccountSummaryResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getFindingsReportAccountSummary(_:logger:)``.
    ///
    /// - Parameters:
    ///   - dailyReportsOnly: A Boolean value indicating whether to only return reports from daily profiles. If set  to True, only analysis data from daily profiles is returned. If set to False,  analysis data is returned from smaller time windows (for example, one hour).
    ///   - maxResults: The maximum number of results returned by  GetFindingsReportAccountSummary in paginated output.  When this parameter is used, GetFindingsReportAccountSummary only returns maxResults  results in a single page along with a nextToken response element. The remaining results of the initial  request can be seen by sending another GetFindingsReportAccountSummary request with the returned  nextToken value.
    ///   - logger: Logger used for logging
    @inlinable
    public func getFindingsReportAccountSummaryPaginator(
        dailyReportsOnly: Bool? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetFindingsReportAccountSummaryRequest, GetFindingsReportAccountSummaryResponse> {
        let input = GetFindingsReportAccountSummaryRequest(
            dailyReportsOnly: dailyReportsOnly, 
            maxResults: maxResults
        )
        return self.getFindingsReportAccountSummaryPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listFindingsReports(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listFindingsReportsPaginator(
        _ input: ListFindingsReportsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListFindingsReportsRequest, ListFindingsReportsResponse> {
        return .init(
            input: input,
            command: self.listFindingsReports,
            inputKey: \ListFindingsReportsRequest.nextToken,
            outputKey: \ListFindingsReportsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listFindingsReports(_:logger:)``.
    ///
    /// - Parameters:
    ///   - dailyReportsOnly: A Boolean value indicating whether to only return reports from daily profiles. If set  to True, only analysis data from daily profiles is returned. If set to False,  analysis data is returned from smaller time windows (for example, one hour).
    ///   - endTime:  The end time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - maxResults: The maximum number of report results returned by ListFindingsReports in paginated output. When this parameter is used, ListFindingsReports only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListFindingsReports request with the returned nextToken value.
    ///   - profilingGroupName: The name of the profiling group from which to search for analysis data.
    ///   - startTime:  The start time of the profile to get analysis data about. You must specify startTime and endTime.  This is specified  using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1  millisecond past June 1, 2020 1:15:02 PM UTC.
    ///   - logger: Logger used for logging
    @inlinable
    public func listFindingsReportsPaginator(
        dailyReportsOnly: Bool? = nil,
        endTime: Date,
        maxResults: Int? = nil,
        profilingGroupName: String,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListFindingsReportsRequest, ListFindingsReportsResponse> {
        let input = ListFindingsReportsRequest(
            dailyReportsOnly: dailyReportsOnly, 
            endTime: endTime, 
            maxResults: maxResults, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return self.listFindingsReportsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfileTimes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileTimesPaginator(
        _ input: ListProfileTimesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfileTimesRequest, ListProfileTimesResponse> {
        return .init(
            input: input,
            command: self.listProfileTimes,
            inputKey: \ListProfileTimesRequest.nextToken,
            outputKey: \ListProfileTimesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfileTimes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - endTime: The end time of the time range from which to list the profiles.
    ///   - maxResults: The maximum number of profile time results returned by ListProfileTimes  in paginated output. When this parameter is used, ListProfileTimes only returns  maxResults results in a single page with a nextToken response  element. The remaining results of the initial request  can be seen by sending another ListProfileTimes request with the returned  nextToken value.
    ///   - orderBy: The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to TIMESTAMP_DESCENDING.
    ///   - period:  The aggregation period. This specifies the period during which an aggregation profile  collects posted agent profiles for a profiling group. There are 3 valid values.     P1D — 1 day     PT1H — 1 hour     PT5M — 5 minutes
    ///   - profilingGroupName: The name of the profiling group.
    ///   - startTime: The start time of the time range from which to list the profiles.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfileTimesPaginator(
        endTime: Date,
        maxResults: Int? = nil,
        orderBy: OrderBy? = nil,
        period: AggregationPeriod,
        profilingGroupName: String,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfileTimesRequest, ListProfileTimesResponse> {
        let input = ListProfileTimesRequest(
            endTime: endTime, 
            maxResults: maxResults, 
            orderBy: orderBy, 
            period: period, 
            profilingGroupName: profilingGroupName, 
            startTime: startTime
        )
        return self.listProfileTimesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfilingGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilingGroupsPaginator(
        _ input: ListProfilingGroupsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProfilingGroupsRequest, ListProfilingGroupsResponse> {
        return .init(
            input: input,
            command: self.listProfilingGroups,
            inputKey: \ListProfilingGroupsRequest.nextToken,
            outputKey: \ListProfilingGroupsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfilingGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - includeDescription: A Boolean value indicating whether to include a description. If true,  then a list of   ProfilingGroupDescription objects  that contain detailed information about profiling groups is returned. If false, then  a list of profiling group names is returned.
    ///   - maxResults: The maximum number of profiling groups results returned by ListProfilingGroups  in paginated output. When this parameter is used, ListProfilingGroups only returns  maxResults results in a single page along with a nextToken response  element. The remaining results of the initial request  can be seen by sending another ListProfilingGroups request with the returned  nextToken value.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilingGroupsPaginator(
        includeDescription: Bool? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProfilingGroupsRequest, ListProfilingGroupsResponse> {
        let input = ListProfilingGroupsRequest(
            includeDescription: includeDescription, 
            maxResults: maxResults
        )
        return self.listProfilingGroupsPaginator(input, logger: logger)
    }
}

extension CodeGuruProfiler.GetFindingsReportAccountSummaryRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeGuruProfiler.GetFindingsReportAccountSummaryRequest {
        return .init(
            dailyReportsOnly: self.dailyReportsOnly,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension CodeGuruProfiler.ListFindingsReportsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeGuruProfiler.ListFindingsReportsRequest {
        return .init(
            dailyReportsOnly: self.dailyReportsOnly,
            endTime: self.endTime,
            maxResults: self.maxResults,
            nextToken: token,
            profilingGroupName: self.profilingGroupName,
            startTime: self.startTime
        )
    }
}

extension CodeGuruProfiler.ListProfileTimesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeGuruProfiler.ListProfileTimesRequest {
        return .init(
            endTime: self.endTime,
            maxResults: self.maxResults,
            nextToken: token,
            orderBy: self.orderBy,
            period: self.period,
            profilingGroupName: self.profilingGroupName,
            startTime: self.startTime
        )
    }
}

extension CodeGuruProfiler.ListProfilingGroupsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeGuruProfiler.ListProfilingGroupsRequest {
        return .init(
            includeDescription: self.includeDescription,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
